package com.jiaquyun.jcyx.entity

import com.module.lemlin.http.HttpResponseData
import java.io.Serializable

data class HomeResponse(
    val data: HomeEntity
) : HttpResponseData()

data class HomeEntity(
    val banner: MutableList<Banner> = mutableListOf(),
    val capsule: Capsule?=null,
    val cat: MutableList<Cat> = mutableListOf(),
    val goods_activity: MutableList<GoodsActivity> = mutableListOf(),
    val seckill: Seckill?=null
):Serializable {
    var goodsList: MutableList<GoodsGroup> = mutableListOf()
}

data class Banner(
    val image: String,
    val jump_type: Int,
    val params: String,
    val title: String
):Serializable

data class Capsule(
    val image: String,
    val jump_type: Int,
    val params: String,
    val title: String
):Serializable

data class CatResponse(
    val data: MutableList<Cat> = mutableListOf()
) : HttpResponseData()

data class Cat(
    val id: Int,
    val image: String,
    val level: Int,
    val name: String,
    val pid: Int
) : Serializable

data class GoodsActiveResponse(
    val data: GoodsActivity
) : HttpResponseData()

data class GoodsActivity(
//    val goods_group: MutableList<GoodsGroup> = mutableListOf(),
    val goods_group: Any,
    val id: Int,
    val image: String,
    val shop_id: Int,
    val subtitle: String,
    val title: String
) : Serializable

data class Seckill(
    val start_time: String,
    val seckill: MutableList<SeckillList> = mutableListOf()
) : Serializable

data class SeckillList(
    val cart_id: Any,
    val cart_num: Any,
    val goods_name: String,
    val guidance_price: String,
    val id: Int,
    val image: String,
    val price: String,
    val shopsgoods: Shopsgoods
) : Serializable

data class Shopsgoods(
    val active_price: String,
    val discount: String,
    val purchase_limit: Int,
    val remaining_percentage: String,
    val seckill_count: Int,
    val seckill_num: String
) : Serializable


data class GoodsListResponse(
    val data: MutableList<GoodsGroup> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class GoodsGroup(
    val active_price: String,
    val active_type: Int,
    var cart_id: Int,
    var cart_num: Int,
    val discount: String,
    val end_time: Int,
    val goods_name: String,
    val guidance_price: String,
    val id: Int,
    val image: String,
    val is_recommend: String,
    val price: String,
    val sales_sum: Int,
    val send_time: String,
    val shop_count: Int,
    val start_time: Int
) : Serializable


data class GoodsRequest(
    var shop_id: String? = null,//店铺ID
    var recommend: Int? = null,//是否推荐 null=全部，0=不推荐，1=推荐商品
    var active_type: Int? = null,//活动类型 null=全部，0=普通商品，1=一口价商品
    var cat_id: Int? = null,//分类ID
    var search: String? = null,//搜索关键字
    var page: Int = 1,//页数
    var rows: Int = 20,//条数
    var sort: String? = null,//排序字段
    var sort_asc: Int? = null//排序 1正序 0倒序
)